﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Animal
{
    class Program
    {
        static void Main(string[] args)
        {
            Tiger q = new Tiger();
            Console.WriteLine("我是老虎");
            q.foot = 4;
            q.GGH();
            q.Living1();
            q.Living2();
            q.Introduce();
            q.Cry();
            Console.WriteLine("------------------------------------------------");

            Cat w = new Cat();
            Console.WriteLine("我是猫");
            w.foot = 4;
            w.GGH();
            w.Living1();
            w.Living2();
            w.Introduce();
            w.Cry();
            Console.WriteLine("------------------------------------------------");

            Eagle e = new Eagle();
            Console.WriteLine("我是老鹰");
            e.foot = 2;
            e.GGH();
            e.Living1();
            e.Living2();
            e.Introduce();
            e.Cry();
            Console.WriteLine("------------------------------------------------");

            Swallow r = new Swallow();
            Console.WriteLine("我是燕子");
            r.foot = 2;
            r.GGH();
            r.Living1();
            r.Living2();
            r.Introduce();
            r.Cry();
            Console.WriteLine("------------------------------------------------");
            Console.ReadKey();
        }
    }
    class Animalia //动物类
    {
        protected int Foot;//脚
        public int foot
        {
            get { return this.Foot; }
            set { this.Foot = value; }
        }
        public Animalia(int foot) 
        {
            this.Foot = foot;
        }
        public Animalia() { }
        public void GGH() 
        {
            Console.WriteLine("我有{0}条腿",this.Foot);
        }
    }
    class Felidae:Animalia //猫科
    {
        public void Living1()
        {
            Console.WriteLine("我会夜视");
        }
        public void Living2() 
        {
            Console.WriteLine("我会吃肉");
        }
    }
    class Birds:Animalia //鸟类
    {
        public void Living1() 
        {
            Console.WriteLine("我有翅膀");
        }
        public void Living2() 
        {
            Console.WriteLine("我有鸟嘴");
        }
    }
    class Tiger : Felidae //老虎
    {

        public void Introduce() 
        {
            Console.WriteLine("我是森林之王");
        }
        public void Cry() 
        {
            Console.WriteLine("我嗷嗷叫");
        }
    }
    class Cat : Felidae //猫
    {
        public void Introduce() 
        {
            Console.WriteLine("别人喜欢撸我");
        }
        public void Cry()
        {
            Console.WriteLine("我喵喵叫");
        }
    }
    class Eagle : Birds //老鹰
    {
        public void Introduce() 
        {
            Console.WriteLine("我有犀利的眼睛");
        }
        public void Cry()
        {
            Console.WriteLine("我妖妖叫");
        }
    }
    class Swallow : Birds //燕子
    {
        public void Introduce() 
        {
            Console.WriteLine("我喜欢在人类家里筑巢");
        }
        public void Cry()
        {
            Console.WriteLine("我叽叽叫");
        }
    }
}
